package struct;

import javax.vecmath.Quat4f;
import javax.vecmath.Vector3f;

public class Quaternion {
	static public void ajouterVecteurMul(Quat4f quat, Vector3f v, float t) {
		Quat4f q = new Quat4f(v.x * t, v.y * t, v.z * t, 0);
		q.normalize();
		q.mul(quat);

		quat.w += q.w * 0.5f;
		quat.x += q.x * 0.5f;
		quat.y += q.y * 0.5f;
		quat.z += q.z * 0.5f;
		// quat.normalize();
	}
}
